#include <stdio.h>
#include <stdlib.h>

int main(void) {
    int score;
    char ch;
    while (1) {
        int ret = scanf("%d", &score);
        if (ret == 0) {
            printf("输入错误：请输入整数！\n");
            while (getchar() != '\n');
            continue;
        }
        if (score < 0 || score > 100) {
            printf("输入错误：请输入0-100的整数！\n");
            while (getchar() != '\n');
            continue;
        }
        ch = getchar();
        if (ch != '\n') {
            printf("输入错误：检测到非数字字符！\n");
            while (getchar() != '\n');
            continue;
        }
        break;
    }

    char grade;
    if (score >= 90)       grade = 'A';
    else if (score >= 80)  grade = 'B';
    else if (score >= 70)  grade = 'C';
    else if (score >= 60)  grade = 'D';
    else                   grade = 'E';

    // 输出结果
    printf("%d分对应的等级是%c\n", score, grade);

    return 0;
}
